import request from '@/utils/request'

export default {
  getActorList(params) {
    return request({
      url: '/actors',
      method: 'get',
      params
    })
  },
  getActorById(id) {
    return request({
      url: '/actors/' + id,
      method: 'get'
    })
  },
  batchDelete(ids) {
    return request({
      url: '/actors/',
      method: 'delete',
      params: {
        ids: ids
      }
    })
  },
  addActor(data) {
    return request({
      url: '/actors',
      method: 'post',
      data
    })
  },
  editActor(data) {
    return request({
      url: '/actors/' + data.id,
      method: 'put',
      data
    })
  },
  getActorType() {
    return request({
      url: '/actor-type',
      method: 'get'
    })
  },
  getPlays() {
    return request({
      url: '/plays-show',
      method: 'get'
    })
  },

  addActorByNodeId(data) {
    return request({
      url: '/actors/node',
      method: 'post',
      data
    })
  },
  deleteByNodeIds(data) {
    return request({
      url: '/actors/node',
      method: 'delete',
      params: data
    })
  },
  queryByName(data) {
    return request({
      url: '/actors/queryByName',
      method: 'get',
      params: data
    })
  },
  updateActorByNode(data) {
    return request({
      url: '/actors/node',
      method: 'put',
      data
    })
  },
  actorLink(data) {
    return request({
      url: '/actors/link',
      method: 'put',
      data
    })
  }

}
